package com.hk.service.quartz;

import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.hk.commons.utils.order.OrderCreateMsg;
import com.hk.service.order.IOrderHandle;

public class HCOrderQuartz extends BaseQuartz {

	private Logger logger = LoggerFactory.getLogger(HCOrderQuartz.class);

	 
	
	@Resource(name = "huochaiOrderImpl")
	private IOrderHandle<OrderCreateMsg> huochaiOrderImpl;
	
	@Override
	public void start() {
		ExecutorService executor = Executors.newFixedThreadPool(1);
        Runnable task = new Runnable() {
            public void run() {
            	huochaiOrderImpl.checkAllOrderInRedis();
            }
        };
        executor.execute(task);
        executor.shutdown();
	}
}
